The technology described herein relates to graphics processing systems that include one or more programmable processing stages (“shaders”), and in particular to the operation of such graphics processing systems when performing “multiview” rendering.
Graphics processing is typically carried out in a pipelined fashion, with one or more pipeline stages operating on the data to generate the final render output, e.g. frame that is displayed. Many graphics processing pipelines now include one or more so-called “shading” stages, commonly referred to as “shaders”. For example, a graphics processing pipeline may include one or more of, and typically all of, a geometry shader, a hull shader, a domain shader, a vertex shader and a fragment (pixel) shader. These shaders are processing stages that execute shader programs on input data values to generate a desired set of output data (e.g. appropriately transformed and lit vertex data in the case of a vertex shader) for processing by the rest of the graphics processing pipeline and/or for output. The shading operations normally operate on so-called “attributes”. An attribute is an input or output variable in a shader program and may represent for example, position, colour or texture coordinate, etc.
A graphics “shader” thus performs graphics processing by running small programs for each work item in an output to be generated, such as a render target, e.g. frame (a “work item” in this regard is usually a vertex (in the case of a vertex shader) or a pixel or sampling position (e.g. in the case of a fragment shader), but it may also be a compute shader work item where the graphics processing pipeline is being used to perform compute shading operations (e.g. in accordance with OpenCL or DirectCompute)).
In graphics shader operation, each work item will be processed by means of an execution thread which will execute the shader program in question for the work item in question. Modern graphics processing units (graphics processors) accordingly typically comprise programmable processing circuitry, e.g. in the form of one or more programmable execution units, that can execute shader programs to perform graphics processing operations. A given shader program to be executed by the programmable processing circuitry (execution unit) will comprise a sequence of instructions, and the programmable processing circuitry (execution unit) will execute the instructions in the sequence appropriately for each execution thread (and work item) that the shader program is to be executed for.
A shader program to be executed by a given “shader” stage of a graphics processing pipeline will be provided by the application that requires the graphics processing using a high-level shader programming language, such as GLSL, HLSL, OpenCL, etc. The high-level shader program is then translated by the shader language compiler to binary code for the target graphics processing pipeline. This binary code will consist of “instructions” which are specified in the instruction set specification for the given target graphics processing pipeline.
It is becoming increasingly common for graphics processing systems to be required to perform so-called “multiview” rendering. In this case, plural different views of a given scene are rendered, e.g. from plural different viewpoints, so as to create a set of images of the scene, with each image, e.g., viewing the scene from a different viewpoint. An example of this is stereoscopic rendering in which two images of a scene, one corresponding to the scene as seen from the left eye, and one corresponding to the scene as seen from the right eye, are generated and then displayed appropriately so as to provide a three-dimensional effect when the images are viewed. It is also known to generate and provide more than two views of a scene, for example for a lenticular display (which can, for example, use four or more images offset from each other).
When generating the multiple views required, typically the image corresponding to each respective view is generated separately and then the images displayed appropriately to achieve the desired, e.g., 3D, effect.
The Applicants believe that there remains scope for improvements to the generation of multiple images corresponding to multiple different views of the same scene when performing multiview rendering in graphics processing systems.
Like reference numerals are used for like components where appropriate in the drawings.